<template>
    <div class="Father">
        <h2>父组件</h2>
        <h3>a:{{ a }}</h3>
        <h3>b:{{ b }}</h3>
        <Child :a="a" :b="b" :addA="addA" v-bind="{x:100,y:200}"></Child>
    </div>
</template>

<script lang="ts" setup name="Father">
    import Child from "./Child.vue"
    import {ref} from "vue";

    //数据
    let a = ref(1)
    let b = ref(2)
    //方法
    function addA(value:number){
        a.value += value
    }

</script>

<style scoped>
.Father{
    background-color: skyblue;
    height: 600px;
}
</style>